package com.wyz.tracing.domain.entity.tracing.different.field;

import com.wyz.tracing.enums.DifferenceType;
import lombok.Getter;
import lombok.Setter;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;


/**
 * @author wyz
 * @version 1.0
 * @date 2023/8/15
 *
 * 集合类型字段的差异
 */
@Getter
@Setter
public class CollectionFieldDifference extends FieldDifference {

    private List<FieldDifference> elementDifference;

    public CollectionFieldDifference(String name, Type type, Object snapshotValue, Object tracValue) {
        super(name, type, snapshotValue, tracValue);
        this.elementDifference = new ArrayList<>();
    }
    public CollectionFieldDifference(String name, Type type, Object snapshotValue, Object tracValue, DifferenceType differenceType) {
        super(name, type, snapshotValue, tracValue, differenceType);
        this.elementDifference = new ArrayList<>();
    }
}
